package com.fenghongzhang.day012eventbus;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

public class Main2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
//        EventBus.getDefault().register(this);
    }

//    @Subscribe(sticky = true,threadMode = ThreadMode.ASYNC)
//    public void getABC(String a){
////        Toast.makeText(this, a, Toast.LENGTH_SHORT).show();
////        Log.i(TAG, "getABC: ");
//    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
//        EventBus.getDefault().unregister(this);
    }
}
